package com.wn.demo03;

/**
 * @author yellow Docter
 * @date 2024-07-09
 * @desc 蜗牛创想：www.woniuxy.com
 *  求和
 *     1-5 的求和 
 */
public class Demo02 {

    public static void main(String[] args) {

        int sum = 0;
        for (int i = 1; i <= 5; i++) {
            System.out.println("i = " + i);
            sum = sum +i;
        }
        System.out.println("1-5的求和是:sum = " + sum);
    }
    
}
